#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>


typedef int Hpdatatype;
typedef struct Heap
{
	Hpdatatype* data;
	int size;
	int capacity;
}Hp;

void InitHeap( Hp*p );
void DestroyHeap(Hp*p);
void PushHeap(Hp*p , int n);
void AdjustUpper(Hp* p);
void PopHeap(Hp* p);
void AdjustDown(Hp* p);
int TopHeap(Hp* p);
bool EmptyHeap(Hp* p);